import { Http } from "../utils/http";

class UserAuth {
    /**
     * 上墙推荐首页信息
     */
    static async getRecommendDataList(data) {
        return await Http.request({url: 'user-auth/recommend', data, type: 'GET'});
    }

    /**
     *  上墙信息
     */
    static async getDataList(data) {
        return await Http.request({url: 'user-auth', data, type: 'GET'});
    }

    /**
     *  上墙推荐信息
     */
    static async getRecommendDataList(data) {
        return await Http.request({url: 'user-auth-recommend', data, type: 'GET'});
    }

    /**
     *  上墙信息详情
     */
    static async getDataInfo(id) {
        return await Http.request({url: `user-auth/info/${id}`, data:{} , type: 'GET'});
    }

    /**
     * 点赞操作
     */
    static async addZan(data) {
        return await Http.request({url: `user-auth/zan`, data , type: 'POST'});
    }

    /**
     * 分享信息
     */
    static async addShare(data) {
        return await Http.request({url: `user-auth/share`, data , type: 'POST'});
    }

    /**
     * 喜欢操作
     */
    static async addLike(data) {
        return await Http.request({url: `user-auth/like`, data , type: 'POST'});
    }

    /**
     * 喜欢列表
     */
    static async getUserAuthLike(data) {
        return await Http.request({url: `user-auth/like`, data , type: 'GET'});
    }

    /**
     * 投诉
     */
    static async addReport(data) {
        return await Http.request({url: `user-auth/report`, data , type: 'POST'});
    }
}

export {
    UserAuth
}